<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;
use think\model\concern\SoftDelete;

/**
 * @property int $deletetime
 * @property int $goods_id 商品
 * @property int $id
 * @property int $num 数量
 * @property int $spec_id 规格
 * @property int $user_id 用户
 * @property string $createtime
 * @property-read \app\model\Goods $goods
 * @property-read \app\model\GoodsSpec $spec
 * @method static \think\db\Query onlyTrashed()
 * @method static \think\db\Query withTrashed()
 * @mixin \think\Model
 */
class GoodsShopcar extends Model
{
	use SoftDelete;
	//
	protected $createTime = 'createtime';
	protected $updateTime = 'updatetime';
	protected $deleteTime = 'deletetime';
	
	function goods()
	{
		return $this->belongsTo(Goods::class,'goods_id');
	}
	
	function spec()
	{
		return $this->belongsTo(GoodsSpec::class,'spec_id');
	}
}
